package com.spic.business.ioc.service.impl;

import com.spic.business.ioc.domain.IocCompliance;
import com.spic.business.ioc.mapper.IocComplianceMapper;
import com.spic.business.ioc.service.IIocComplianceService;
import com.spic.common.core.utils.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 达标情况 IOCService业务层处理
 *
 * @author spic
 * @date 2022-04-14
 */
@Service
public class IocComplianceServiceImpl implements IIocComplianceService
{
    @Autowired
    private IocComplianceMapper iocComplianceMapper;

    /**
     * 查询达标情况 IOC
     *
     * @param id 达标情况 IOC主键
     * @return 达标情况 IOC
     */
    @Override
    public IocCompliance selectIocComplianceById(String id)
    {
        return iocComplianceMapper.selectIocComplianceById(id);
    }

    /**
     * 查询达标情况 IOC列表
     *
     * @param iocCompliance 达标情况 IOC
     * @return 达标情况 IOC
     */
    @Override
    public List<IocCompliance> selectIocComplianceList(IocCompliance iocCompliance)
    {
        return iocComplianceMapper.selectIocComplianceList(iocCompliance);
    }

    /**
     * 新增达标情况 IOC
     *
     * @param iocCompliance 达标情况 IOC
     * @return 结果
     */
    @Override
    public int insertIocCompliance(IocCompliance iocCompliance)
    {
        String uuid = UUIDUtil.createUUID();
        iocCompliance.setId(uuid);
        return iocComplianceMapper.insertIocCompliance(iocCompliance);
    }

    /**
     * 修改达标情况 IOC
     *
     * @param iocCompliance 达标情况 IOC
     * @return 结果
     */
    @Override
    public int updateIocCompliance(IocCompliance iocCompliance)
    {
        return iocComplianceMapper.updateIocCompliance(iocCompliance);
    }

    /**
     * 批量删除达标情况 IOC
     *
     * @param ids 需要删除的达标情况 IOC主键
     * @return 结果
     */
    @Override
    public int deleteIocComplianceByIds(String[] ids)
    {
        return iocComplianceMapper.deleteIocComplianceByIds(ids);
    }

    /**
     * 删除达标情况 IOC信息
     *
     * @param id 达标情况 IOC主键
     * @return 结果
     */
    @Override
    public int deleteIocComplianceById(String id)
    {
        return iocComplianceMapper.deleteIocComplianceById(id);
    }

    /**
     * @return PM10达标情况
     */
    @Override
    public List<Map<String, Object>> getPm10Compliance()
    {
        return null;
    }
}
